home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / allowo1g / domtree.htc < prev    next >
Text File  |  1999-07-11  |  915b  |  43 lines

  1. <PUBLIC:COMPONENT>
  2.  
  3. <PUBLIC:ATTACH EVENT="onmouseover" ONEVENT="rollOn()" />
  4. <PUBLIC:ATTACH EVENT="onmouseout"  ONEVENT="rollOff()" />
  5. <PUBLIC:ATTACH EVENT="onclick"  ONEVENT="ExpandCollapse()" />
  6.  
  7. <SCRIPT LANGUAGE="JScript">
  8.  
  9. function rollOn() {
  10.     with (event.srcElement) {
  11.         if (className=="clParent") {
  12.             with (runtimeStyle) {
  13.                 cursor = "hand";
  14.                 textDecoration  = "underline";
  15.             }
  16.             event.cancelBubble = true;
  17.         }
  18.     }
  19. }
  20. function rollOff() {
  21.     with (event.srcElement) {
  22.         if (className=="clParent") {
  23.             with (runtimeStyle) {
  24.                 cursor = "auto";
  25.                 textDecoration  = "none";
  26.             }
  27.             event.cancelBubble = true;
  28.         }
  29.     }
  30. }
  31. function ExpandCollapse() {
  32.     with (event.srcElement) {
  33.         if (className=="clParent") {
  34.              with (nextSibling.runtimeStyle)    {
  35.                 display = (display == "") ? "block" : "";
  36.             }
  37.             event.cancelBubble = true;
  38.         }
  39.     }
  40. }
  41. </SCRIPT>
  42. </PUBLIC:COMPONENT>
  43.